package com.laboratory.serviceprovide.workBench.mapper;

import com.Laboratory.workBench.pojo.booking;
import com.Laboratory.workBench.pojo.room;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface roomMapper {
    //根据条件获取可预约教室
    List<room> selectRoomListByTime(
            @Param("applyDate") String applyDate,
            @Param("applyTime") String applyTime);
    //插入新预约记录
    int insertBookingRoomRecord(booking booking);
    //获取教室信息列表
    List<Map<Object,Object>> getRoomMsgList();

    List<booking> getRoomBookingList(@Param("pageNo") Integer pageNo,
                                     @Param("pageSize") Integer pageSize);
    List<room> getRoomListByCondition(@Param("roomLocation") String roomLocation,
                                      @Param("number") Integer number);
    List<String> getRoomLocationList();

    int insertRoom(room room);

    int updateRoomById(room room);

    int updateRoomStateByIds(String [] ids);

    int deleteBookingByRoomIdsForDelRoom(String [] ids);

    int deleteRoomByIds(String [] ids);

    room getRoomByRandom();

    int updateRoomStateById(@Param("id") String id);

    int deleteInvalidBookingRecord(String timeSign);

    int updateRoomStateByIdForClearProject(String id);
}